package com.atjava.webspider;

import java.io.File;

import com.atjava.jox.io.JOXReader;
import com.atjava.webspider.consts.Const;
import com.atjava.webspider.gui.SpiderMainGui;
import com.atjava.webspider.model.Task;
import com.atjava.webspider.thread.SpiderTask;

public class Spider {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		SpiderMainGui mainFrame = SpiderMainGui.getInstance();
		mainFrame.setVisible(true);
		mainFrame.setLocationRelativeTo(null);

	}

	/*
	public static void main1(String[] args) {
		try {
			JOXReader jox = new JOXReader();
			Task tsk = jox.readXml(new File(Const.TASK_HOME
					+ "/21tx-dotnet/task.xml"), Task.class);

			QueueThread queue = new QueueThread();
			// for(int i=0;i<taskList.size();i++){
			// Task task = taskList.get(i);
			queue.execute(new SpiderTask(tsk));
			// }

			// start
			queue.start();
			queue.wattingstop();

		} catch (Exception e) {
			LogUtil.log(e);
		}
	}*/

	public static void mainw(String[] args) throws Exception {
		JOXReader jox = new JOXReader();
		Task tsk = jox.readXml(new File(Const.TASK_HOME
				+ "/21tx-dotnet/task.xml"), Task.class);

		SpiderTask task1 = new SpiderTask(tsk);
		//task1.start();

	}

}
